#ifndef GAMESTATE_MASTER_MASTER_H
#define GAMESTATE_MASTER_MASTER_H


#include "Engine/Sense.h"
#include "Engine/Reason.h"
#include "Engine/Visual.h"
#include "Engine/Resource/Graphic.h"
#include "Interface/Menu.h"
#include "SDL.h"

namespace Engine { class Backbone; } 
namespace GameState { namespace Master { class MasterEntry; }  } 

namespace GameState {

namespace Master {

// The main interface/main screen
class Master : public Engine::Sense, public Engine::Reason, public Engine::Visual {
  private:
	Engine::Resource::Graphic background; 
	Interface::Menu mainMenu; 
	Engine::Resource::Graphic menuBackground; 
	Master(); 

  public:
	~Master(); 
	inline void exit(); 
	void pulse(int delta); 
	Engine::Resource::GraphicList display(); 
	void keyDown(SDLKey sym, SDLMod mod, Uint16 unicode); // Asks for generation of a graphical model to be displayed
	static inline Master * raise(); 

  private:
	static Master * singleInstance; // Single master screen instance
};
inline void Master::exit() {
}

// Raise the singleton object

inline Master * Master::raise()
{
	if (singleInstance == NULL) singleInstance = new Master();
	return singleInstance;
}


} // namespace GameState::Master

} // namespace GameState
#endif
